#pragma once
#include "Renderer.h"
namespace mini
{
	class CPostRenderer : public CRenderer
	{
		friend class CRendererFactory;
		friend class CRendererEngine;
	public:
		virtual ~CPostRenderer();

	private:
		CPostRenderer(CDevice* pDevice);
		void useTarget();
		void swapTarget();
		virtual void commitToGpu() override;
	//	virtual void addUnit(CUnit* pUnit, CMaterialUnit* pMaterialUnit, EntityType Type, INT32 zLayer) override;
	//	virtual void clearAllUnit();

	private:
		CMaterialUnit* mpMaterialUnit = nullptr;
		std::vector<CTexture*>	mTextureArray;
		std::vector<ID3D11RenderTargetView*> mpRenderTargetViewArray;
		CMeshUnit* mpMeshUnit = nullptr;
		ID3D11ShaderResourceView* mpCurrentShaderRV = nullptr;
		UINT8 mSwapIndex : 1;
	};
}
